module.exports = app => {
    const { DATE, INTEGER,DECIMAL } = app.Sequelize;

    const Spread = app.model.define('t_spread', {
        id: { type: INTEGER, primaryKey: true, autoIncrement: true },
        user_id:{type:DECIMAL(20),'allowNull': false},
        ad_id:{type:DECIMAL(20),'allowNull': false},
        createtime:{type:DATE,'allowNull': false},
        modifytime:{type:DATE,'allowNull': false},
        state:{type:DECIMAL(1),'allowNull': false},
        earn:{type:DECIMAL(20),'allowNull': false},
    }, {
        timestamps: false,  //去除createAt updateAt
        freezeTableName: true,  //使用自定义表名
    })
    return Spread;
};